<form name="editrole" method="post" action="" enctype="multipart/form-data" onsubmit="return checkInput();">
	<p id ="title">General:</p>
	<table border="0" cellpadding="0" cellspacing="0" id="id-form">

		<tr>
			<th valign="top">Role</th>
			<td><input type="text" name="rolename" value="{role_val}" class="inp-form2" disabled="disabled" /></td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>
		</br>
		<tr>

			<th valign="top">Password</th>

			<td><select name="password" class="styledselect_form_3" value="All">
			<option value="1" {yespass}>Yes</option>
			<option value="0" {nopass}>No</option>
			</select>
			</td>
		</tr>
		<tr>

			<th valign="top">New Password</th>

			<td><input type="text" name="newpassword" value="" class="inp-form2" disabled={passdisabled}/>
			</td>
			<td>
				<div class="error-left"></div>
				<div class="error-inner"></div>
			</td>
		</tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="0" id="id-form">		
		<tr>
			</br>
			<th>&nbsp;</th>

			<td valign="top">

				<input name ="submit" type="submit" value="" class="form-submit" />

				<input name ="reset" type="reset" value="" class="form-reset"  />

			</td>

			<td></td>

		</tr>
		</table>
		</br>
		</br>
		
</form>

<script>
	$(document).ready(function(){
		$(".error-inner").each(function(){
			if($(this).html() == '') {
				$(this).css("visibility", "hidden");
				$(this).siblings(".error-left").css("visibility", "hidden");
			}
		});
	});
	
	$(document).ready(function(){
		
	 	$('form[name="addUser"]').validate({
	    	rules: {
				username: { required: true},
				password: { required: true},
				quota: { digits: true},
			},
			errorPlacement: function(error, element){
				$(element).parents('td').next().children(".error-inner").html(error);
										        
		        				
			},
			highlight: function(element, errorClass) {				
				$(element).parents('td').next().children(".error-left, .error-inner").css("visibility", "visible");
				
			},
			unhighlight: function(element, errorClass) {
				$(element).parent('td').next().children(".error-left, .error-inner").css("visibility", "hidden");
				
			}
		    
		});
	});
	
</script>